package com.ruoyi.system.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.core.page.BaseMapperPlus;
import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.domain.vo.CustomerVo;
import org.apache.ibatis.annotations.Param;

/**
 * 经销商档案Mapper接口
 *
 * @author anan
 * @date 2021-03-02
 */
public interface SysCustomerMapper extends BaseMapperPlus<CustomerVo>
{
    /**
     * 查询经销商档案
     *
     * @param id 经销商档案ID
     * @return 经销商档案
     */
    public SysCustomer selectSysCustomerById(Long id);

    /**
     * 查询经销商档案列表
     *
     * @param sysCustomer 经销商档案
     * @return 经销商档案集合
     */
    public List<SysCustomer> selectSysCustomerList(SysCustomer sysCustomer);

    /**
     * 查询经销商档案列表
     *
     * @param sysCustomer 经销商档案
     * @return 经销商档案集合
     */
    public List<CustomerVo> selectCustomerList(CustomerVo sysCustomer);

    /**
     * 新增经销商档案
     *
     * @param sysCustomer 经销商档案
     * @return 结果
     */
    public int insertSysCustomer(SysCustomer sysCustomer);

    /**
     * 修改经销商档案
     *
     * @param sysCustomer 经销商档案
     * @return 结果
     */
    public int updateSysCustomer(SysCustomer sysCustomer);

    /**
     * 删除经销商档案
     *
     * @param id 经销商档案ID
     * @return 结果
     */
    public int deleteSysCustomerById(Long id);

    /**
     * 批量删除经销商档案
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteSysCustomerByIds(Long[] ids);

    public List<SysCustomer> roleCustomerTreeselect(Long roleId);

    public List<Map<String,Object>> selectCustomerListByRoleId(@Param("roleId") Long roleId, @Param("customerCheckStrictly") boolean customerCheckStrictly);

    public List<Map<String,Object>> selectCustomerListByUserIdOld(@Param("userId") Long userId, @Param("customerCheckStrictly") boolean customerCheckStrictly);

    public List<Map<String,Object>> selectCustomerListByUserId(@Param("userId") Long userId);

}
